
package org.appfuse.dao;

import java.util.List;

import org.appfuse.dao.Dao;
import org.appfuse.model.Criteria;

public interface CriteriaDao extends Dao {

    /**
     * Retrieves all of the criterias
     */
    public List getCriterias(Criteria criteria);

    /**
     * Gets criteria's information based on primary key. An
     * ObjectRetrievalFailureException Runtime Exception is thrown if 
     * nothing is found.
     * 
     * @param id the criteria's id
     * @return criteria populated criteria object
     */
    public Criteria getCriteria(final Long id);

    /**
     * Saves a criteria's information
     * @param criteria the object to be saved
     */    
    public void saveCriteria(Criteria criteria);
    
    /**
     * Updates a criteria's information
     * @param criteria the object to be updated
     */    
    public void updateCriteria(Criteria criteria);

    /**
     * Removes a criteria from the database by id
     * @param id the criteria's id
     */
    public void removeCriteria(final Long id);
    
    public List getAllCriterias();
}

